package com.xydtech.busiflw.domain;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xydtech.common.annotation.Excel;
import com.xydtech.common.core.domain.BaseEntity;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

import java.util.Date;

/**
 * 业务流程实例对象 busifl_instance
 *
 * @author JHON
 * @date 2021-06-09
 */
public class BusiflInstance extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /** 流程实例号 */
    private String instanceId;

    /** 流程号 */
    @Excel(name = "流程号")
    private Long flowId;

    /** 流程版本号 */
    @Excel(name = "流程版本号")
    private Long versionId;

    /** 实例创建人 */
    @Excel(name = "实例创建人")
    private Long createUser;

    /** 实例结束时间 */
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
    @Excel(name = "实例结束时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date stopTime;

    /** 结束人 */
    @Excel(name = "结束人")
    private Long stopUser;

    /** 实例状态            1-新建            2-流转            3-结束 */
    @Excel(name = "实例状态            1-新建            2-流转            3-结束")
    private String instState;

    /** 实例关键信息 */
    @Excel(name = "实例关键信息")
    private String keyInfo;

    public void setInstanceId(String instanceId) {
        this.instanceId = instanceId;
    }

    public String getInstanceId() {
        return instanceId;
    }

    public void setFlowId(Long flowId) {
        this.flowId = flowId;
    }

    public Long getFlowId() {
        return flowId;
    }

    public void setVersionId(Long versionId) {
        this.versionId = versionId;
    }

    public Long getVersionId() {
        return versionId;
    }

    public void setCreateUser(Long createUser) {
        this.createUser = createUser;
    }

    public Long getCreateUser() {
        return createUser;
    }

    public void setStopTime(Date stopTime) {
        this.stopTime = stopTime;
    }

    public Date getStopTime() {
        return stopTime;
    }

    public void setStopUser(Long stopUser) {
        this.stopUser = stopUser;
    }

    public Long getStopUser() {
        return stopUser;
    }

    public void setInstState(String instState) {
        this.instState = instState;
    }

    public String getInstState() {
        return instState;
    }

    public void setKeyInfo(String keyInfo) {
        this.keyInfo = keyInfo;
    }

    public String getKeyInfo() {
        return keyInfo;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("instanceId", getInstanceId())
                .append("flowId", getFlowId())
                .append("versionId", getVersionId())
                .append("createTime", getCreateTime())
                .append("createUser", getCreateUser())
                .append("stopTime", getStopTime())
                .append("stopUser", getStopUser())
                .append("instState", getInstState())
                .append("keyInfo", getKeyInfo())
                .toString();
    }
}
